#ifndef INPUTFORM_H
#define INPUTFORM_H

#include <QWidget>
#include <QList>
#include <QString>
#include <QShowEvent>
#include <QResizeEvent>
#include <QKeyEvent>
#include <QCloseEvent>
#include <QMenuBar>
#include <QMenu>

namespace Ui {
class InputForm;
}

class InputForm : public QWidget
{
    Q_OBJECT

public:
    explicit InputForm(QWidget *parent = nullptr);
    ~InputForm();

    void setRomaji(QList<QString> romaji_list);
    void setTextList(QList<QString> text_list);

protected:
    void showEvent(QShowEvent *);
    void resizeEvent(QResizeEvent *event);
    void keyReleaseEvent(QKeyEvent *event);
    void closeEvent(QCloseEvent *);

private slots:
    void on_toggle_tip_clicked();

    void on_input_line_edit_textEdited(const QString &arg1);

signals:
    void closeInputForm();

private:
    Ui::InputForm *ui;
    bool show_tip;
    int rand;
    QList<QString> text_list;
    QList<QString> romaji_list;
    QMenu *menu;
    QMenuBar *menu_bar;

    void resize(int w, int h);
};

#endif // INPUTFORM_H
